/**
 * 
 */
package kr.co.insoft.driver.openstack.model;

import java.net.URI;
import java.util.Map;

import kr.co.insoft.driver.model.ImageModel;

import org.jclouds.compute.domain.Image;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author IN-SOFT Inc. skpark@in-soft.co.kr
 *
 */
public class OpenStackImageModel extends ImageModel{

	
	/**
	 * 
	 */
	private static final long serialVersionUID = -8799640360032537607L;

	private static final Logger logger = LoggerFactory
			.getLogger(OpenStackImageModel.class);
	
	String description;
	String backendStatus;
	String name;
	String providerId;
	URI uri;
	String version;
	String operatingSystemName;
	Map<String, String> userMetadata;
	
	/**
	 * 
	 */
	public OpenStackImageModel() {		
	}
	
	/**
	 * @param image 
	 */
	public OpenStackImageModel(Image image) {
		if (logger.isDebugEnabled())
			logger.debug("##### image : {}", image);
		setImageId(image.getId());
		this.description = image.getDescription();
		this.backendStatus = image.getBackendStatus();
		this.name = image.getName();
		this.providerId = image.getProviderId();
		this.uri = image.getUri();
		this.version = image.getVersion();
		this.operatingSystemName = image.getOperatingSystem().getName();
		this.userMetadata = image.getUserMetadata();
	}
	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}
	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}
	/**
	 * @return the backendStatus
	 */
	public String getBackendStatus() {
		return backendStatus;
	}
	/**
	 * @param backendStatus the backendStatus to set
	 */
	public void setBackendStatus(String backendStatus) {
		this.backendStatus = backendStatus;
	}
	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @return the providerId
	 */
	public String getProviderId() {
		return providerId;
	}
	/**
	 * @param providerId the providerId to set
	 */
	public void setProviderId(String providerId) {
		this.providerId = providerId;
	}
	/**
	 * @return the uri
	 */
	public URI getUri() {
		return uri;
	}
	/**
	 * @param uri the uri to set
	 */
	public void setUri(URI uri) {
		this.uri = uri;
	}
	/**
	 * @return the version
	 */
	public String getVersion() {
		return version;
	}
	/**
	 * @param version the version to set
	 */
	public void setVersion(String version) {
		this.version = version;
	}
	/**
	 * @return the operatingSystemName
	 */
	public String getOperatingSystemName() {
		return operatingSystemName;
	}
	/**
	 * @param operatingSystemName the operatingSystemName to set
	 */
	public void setOperatingSystemName(String operatingSystemName) {
		this.operatingSystemName = operatingSystemName;
	}
	/**
	 * @return the userMetadata
	 */
	public Map<String, String> getUserMetadata() {
		return userMetadata;
	}
	/**
	 * @param userMetadata the userMetadata to set
	 */
	public void setUserMetadata(Map<String, String> userMetadata) {
		this.userMetadata = userMetadata;
	}	
}
